package com.hc.oa.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * pj_tasks:
 */
@Entity
@Table(name = "pj_tasks")
public class PjTasks implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * task_id:
	 */
	private int taskId;

	/**
	 * task_name:
	 */
	private String taskName;

	/**
	 * parent_id:
	 */
	private String parentId;

	/**
	 * owner:
	 */
	private String owner;

	/**
	 * plan_start_date:
	 */
	private Date planStartDate;

	/**
	 * plan_delivery_date:
	 */
	private Date planDeliveryDate;

	/**
	 * actual_start_date:
	 */
	private Date actualStartDate;

	/**
	 * actual_delivery_date:
	 */
	private Date actualDeliveryDate;

	/**
	 * percent_completed:
	 */
	private float percentCompleted;

	/**
	 * ontrack_status_id:
	 */
	private byte ontrackStatusId;

	/**
	 * project_priority_id:
	 */
	private byte projectPriorityId;

	/**
	 * project_status_id:
	 */
	private byte projectStatusId;

	/**
	 * creator:
	 */
	private String creator;

	/**
	 * create_date:
	 */
	private Date createDate;

	/**
	 * updator:
	 */
	private String updator;

	/**
	 * update_date:
	 */
	private Date updateDate;

	/**
	 * description:
	 */
	private String description;

	/**
	 * pm_task_types:
	 */
	private String taskTypeId;

	/**
	 * pm_task_member:
	 */
	private Set<PmTaskMember> pmTaskMemberSet = new HashSet<PmTaskMember>(0);

	public PjTasks() {
		super();
	}

	public PjTasks(int taskId, String taskName, String parentId, String owner,
			Date planStartDate, Date planDeliveryDate, Date actualStartDate,
			Date actualDeliveryDate, float percentCompleted,
			byte ontrackStatusId, byte projectPriorityId, byte projectStatusId,
			String creator, Date createDate, String updator, Date updateDate,
			String description, String taskTypeId,
			Set<PmTaskMember> pmTaskMemberSet) {
		super();
		this.taskId = taskId;
		this.taskName = taskName;
		this.parentId = parentId;
		this.owner = owner;
		this.planStartDate = planStartDate;
		this.planDeliveryDate = planDeliveryDate;
		this.actualStartDate = actualStartDate;
		this.actualDeliveryDate = actualDeliveryDate;
		this.percentCompleted = percentCompleted;
		this.ontrackStatusId = ontrackStatusId;
		this.projectPriorityId = projectPriorityId;
		this.projectStatusId = projectStatusId;
		this.creator = creator;
		this.createDate = createDate;
		this.updator = updator;
		this.updateDate = updateDate;
		this.description = description;
		this.taskTypeId = taskTypeId;
		this.pmTaskMemberSet = pmTaskMemberSet;
	}

	public void setTaskId(int taskId) {
		this.taskId = taskId;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "task_id", nullable = false)
	public int getTaskId() {
		return taskId;
	}

	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}

	@Column(name = "task_name", length = 32, nullable = false)
	public String getTaskName() {
		return taskName;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	@Column(name = "parent_id", length = 18)
	public String getParentId() {
		return parentId;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	@Column(name = "owner", length = 32)
	public String getOwner() {
		return owner;
	}

	public void setPlanStartDate(Date planStartDate) {
		this.planStartDate = planStartDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "plan_start_date")
	public Date getPlanStartDate() {
		return planStartDate;
	}

	public void setPlanDeliveryDate(Date planDeliveryDate) {
		this.planDeliveryDate = planDeliveryDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "plan_delivery_date")
	public Date getPlanDeliveryDate() {
		return planDeliveryDate;
	}

	public void setActualStartDate(Date actualStartDate) {
		this.actualStartDate = actualStartDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "actual_start_date")
	public Date getActualStartDate() {
		return actualStartDate;
	}

	public void setActualDeliveryDate(Date actualDeliveryDate) {
		this.actualDeliveryDate = actualDeliveryDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "actual_delivery_date")
	public Date getActualDeliveryDate() {
		return actualDeliveryDate;
	}

	public void setPercentCompleted(float percentCompleted) {
		this.percentCompleted = percentCompleted;
	}

	@Column(name = "percent_completed")
	public float getPercentCompleted() {
		return percentCompleted;
	}

	public void setOntrackStatusId(byte ontrackStatusId) {
		this.ontrackStatusId = ontrackStatusId;
	}

	@Column(name = "ontrack_status_id", nullable = false)
	public byte getOntrackStatusId() {
		return ontrackStatusId;
	}

	public void setProjectPriorityId(byte projectPriorityId) {
		this.projectPriorityId = projectPriorityId;
	}

	@Column(name = "project_priority_id", nullable = false)
	public byte getProjectPriorityId() {
		return projectPriorityId;
	}

	public void setProjectStatusId(byte projectStatusId) {
		this.projectStatusId = projectStatusId;
	}

	@Column(name = "project_status_id", nullable = false)
	public byte getProjectStatusId() {
		return projectStatusId;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	@Column(name = "creator", length = 18)
	public String getCreator() {
		return creator;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_date")
	public Date getCreateDate() {
		return createDate;
	}

	public void setUpdator(String updator) {
		this.updator = updator;
	}

	@Column(name = "updator", length = 18)
	public String getUpdator() {
		return updator;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_date")
	public Date getUpdateDate() {
		return updateDate;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "description", length = 80)
	public String getDescription() {
		return description;
	}

	@Column(name = "task_type_id", length = 4)
	public String getTaskTypeId() {
		return taskTypeId;
	}

	public void setTaskTypeId(String taskTypeId) {
		this.taskTypeId = taskTypeId;
	}

	public void setPmTaskMemberSet(Set<PmTaskMember> pmTaskMemberSet) {
		this.pmTaskMemberSet = pmTaskMemberSet;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "pjTasks")
	public Set<PmTaskMember> getPmTaskMemberSet() {
		return pmTaskMemberSet;
	}

	public String toString() {
		return "PjTasks [taskId=" + taskId + ",taskName=" + taskName
				+ ",parentId=" + parentId + ",owner=" + owner
				+ ",planStartDate=" + planStartDate + ",planDeliveryDate="
				+ planDeliveryDate + ",actualStartDate=" + actualStartDate
				+ ",actualDeliveryDate=" + actualDeliveryDate
				+ ",percentCompleted=" + percentCompleted + ",ontrackStatusId="
				+ ontrackStatusId + ",projectPriorityId=" + projectPriorityId
				+ ",projectStatusId=" + projectStatusId + ",creator=" + creator
				+ ",createDate=" + createDate + ",updator=" + updator
				+ ",updateDate=" + updateDate + ",description=" + description
				+ ",taskTypeId=" + taskTypeId + ",pmTaskMemberSet="
				+ pmTaskMemberSet + "]";
	}

}
